***********************
*Time Series Analysis for the Social Sciences
*Box-Steffensmeier, Freeman, Hitt, and Pevehouse
*
*Chapter 5 replication code
************************

************************
*Use partyid.dta for all tables and figures in Chapter 5
*Sources: http://www.icpsr.umich.edu/icpsrweb/ICPSR/studies/1119 and 
*http://dvn.iq.harvard.edu/dvn/dv/Steffensmeier
*************************
*gen qdate = quarterly(time,"YQ")
tsset qdate, quarterly

*Figure 5.1 

tsline macropart

*Figure 5.2

tsline consumer

*Figure 5.3 

tsline papp

*Figure 5.4

ac macropart

*Figure 5.5

ac consumer

*Figure 5.6

ac papp

*Table 5.2

dfuller papp
dfuller consumer
dfuller macropart

*Table 5.3
	*findit lomackinlay to install the command
	
lomackinlay papp
lomackinlay consumer
lomackinlay macropart

*Table 5.4
	*findit lomodrs to install the command
lomodrs papp
lomodrs consumer
lomodrs macropart

*Table 5.5

kpss papp, maxlag(8)
kpss consumer, maxlag(8)
kpss macropart, maxlag(8)

*Table 5.6

kpss papp, maxlag(8) notrend
kpss consumer, maxlag(8) notrend
kpss macropart, maxlag(8) notrend

*Table 5.7

arima macropart, arima(1,0,0)
arima macropart, arima(1,1,0)


